function compressPixels(originalPixels: number[]): number[] {
    const compressedPixels: number[] = [];
    const blockSize: number = 100 / 16; // 每个压缩块的大小
  
    for (let y: number = 0; y < 16; y++) {
      for (let x: number = 0; x < 16; x++) {
        let sumR: number = 0, sumG: number = 0, sumB: number = 0;
        // 遍历每个压缩块中的像素，计算均值
        for (let j: number = 0; j < blockSize; j++) {
          for (let i: number = 0; i < blockSize; i++) {
            const pixelIndex: number = ((y * blockSize + j) * 100 + (x * blockSize + i)) * 4;
            sumR += originalPixels[pixelIndex];
            sumG += originalPixels[pixelIndex + 1];
            sumB += originalPixels[pixelIndex + 2];
          }
        }
        // 计算均值
        const avgR: number = Math.round(sumR / (blockSize * blockSize));
        const avgG: number = Math.round(sumG / (blockSize * blockSize));
        const avgB: number = Math.round(sumB / (blockSize * blockSize));
        // 将均值作为压缩后的像素值
        compressedPixels.push(avgR, avgG, avgB);
      }
    }
  
    return compressedPixels;
  }
  
  // 使用示例
  const originalPixels: number[] = [/* 10000个像素点的RGB数据 */];
  const compressedPixels: number[] = compressPixels(originalPixels);